package com.dds.system.service.union.impl;

import java.util.List;
import com.dds.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dds.system.mapper.union.UnionShopOrderRefundMapper;
import com.dds.system.domain.union.UnionShopOrderRefund;
import com.dds.system.service.union.IUnionShopOrderRefundService;

/**
 * 联盟商订单退款记录Service业务层处理
 * 
 * @author gaolianjie
 * @date 2021-04-01
 */
@Service
public class UnionShopOrderRefundServiceImpl implements IUnionShopOrderRefundService 
{
    @Autowired
    private UnionShopOrderRefundMapper unionShopOrderRefundMapper;

    /**
     * 查询联盟商订单退款记录
     * 
     * @param refundId 联盟商订单退款记录ID
     * @return 联盟商订单退款记录
     */
    @Override
    public UnionShopOrderRefund selectUnionShopOrderRefundById(Integer refundId)
    {
        return unionShopOrderRefundMapper.selectUnionShopOrderRefundById(refundId);
    }

    /**
     * 查询联盟商订单退款记录列表
     * 
     * @param unionShopOrderRefund 联盟商订单退款记录
     * @return 联盟商订单退款记录
     */
    @Override
    public List<UnionShopOrderRefund> selectUnionShopOrderRefundList(UnionShopOrderRefund unionShopOrderRefund)
    {
        return unionShopOrderRefundMapper.selectUnionShopOrderRefundList(unionShopOrderRefund);
    }

    /**
     * 新增联盟商订单退款记录
     * 
     * @param unionShopOrderRefund 联盟商订单退款记录
     * @return 结果
     */
    @Override
    public int insertUnionShopOrderRefund(UnionShopOrderRefund unionShopOrderRefund)
    {
        unionShopOrderRefund.setCreateTime(DateUtils.getNowDate());
        return unionShopOrderRefundMapper.insertUnionShopOrderRefund(unionShopOrderRefund);
    }

    /**
     * 修改联盟商订单退款记录
     * 
     * @param unionShopOrderRefund 联盟商订单退款记录
     * @return 结果
     */
    @Override
    public int updateUnionShopOrderRefund(UnionShopOrderRefund unionShopOrderRefund)
    {
        return unionShopOrderRefundMapper.updateUnionShopOrderRefund(unionShopOrderRefund);
    }

    /**
     * 批量删除联盟商订单退款记录
     * 
     * @param refundIds 需要删除的联盟商订单退款记录ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopOrderRefundByIds(Integer[] refundIds)
    {
        return unionShopOrderRefundMapper.deleteUnionShopOrderRefundByIds(refundIds);
    }

    /**
     * 删除联盟商订单退款记录信息
     * 
     * @param refundId 联盟商订单退款记录ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopOrderRefundById(Integer refundId)
    {
        return unionShopOrderRefundMapper.deleteUnionShopOrderRefundById(refundId);
    }
}
